package cn.yunyichina.provider.framework.dubbo.service;

import cn.yunyichina.provider.framework.data.SpringContextHandler;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.iface.entity.common.ResponseObject;
import cn.yunyichina.provider.iface.service.IWechatpay;

public class WechatPayService {

    private static final String serviceName = "wetchatPayService";

    private static IWechatpay wetchatPayService;

    static {
        wetchatPayService = SpringContextHandler.getBean(serviceName);
    }

    public static IWechatpay getWechatPayClient() {
        return wetchatPayService;
    }

    public static Response callUnderlineFromInternal(String method, String data) {
        return wetchatPayService.callUnderlineFromInternal("", method, data, (short) 0);
    }

    public static ResponseObject callUnderlineFromInternalObject(String method, String data) {
        return wetchatPayService.callUnderlineFromInternalObject("", method, data, (short) 0);
    }

    public static Response callUnderlineFromInternal(String sessionId, String method, String data) {
        return wetchatPayService.callUnderlineFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String sessionId, String method, String data) {
        return wetchatPayService.callHumpFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String method, String data) {
        return wetchatPayService.callHumpFromInternal("", method, data, (short) 0);
    }

}
